package cn.wolfcode.cotroller;

import cn.wolfcode.domain.Emp;
import cn.wolfcode.domain.Result;
import cn.wolfcode.service.EmpService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@Slf4j
public class LoginCotroller {
    @Autowired
    private EmpService empService;
    @PostMapping("/login")
    public Result login(@RequestBody Emp emp){
        log.info("用户登录");
        return empService.login(emp);
    }

}
